﻿namespace PhoneApp;
/*
public class Dome
{
    private string name;

    public class Phone
    {
        
        public string Brand { get; set; }
        
        public int Weight { get; set; }
        public int Camera { get; set; }
        public int Price { get; set; }
        public void PrintInfo()
        {
            Console.WriteLine("手机信息如下：");
            Console.WriteLine($"品牌：{Brand}");
            Console.WriteLine($"重量：{Weight}g");
            Console.WriteLine($"后置摄像头像素：{Camera}");
            Console.WriteLine($"价格：{Price}元");
        }
    }

    public void TestPrint2()
    {
        Console.WriteLine("请输入一个三位数");
        int num = Convert.ToInt32(Console.ReadLine());//控制输入一个值。

        //判断闰年
        //能否被4整除，并且不能被100整除
        bool flat = (num% 4 ==0 && num% 100 != 0)||(num%400==0);
        if(flat==true)
        {Console.WriteLine("是闰年");}
        else{Console.WriteLine("不是闰年");}
    }

   
            // 计算旅游行程价格的方法
            public  double CalculateTravelPrice(int month, string transport)
            {
                double originalPrice = 8800;
                double discount = 0;

                if (month >= 5 && month <= 10)
                {
                    if (transport == "航班")
                    {
                        discount = 0.9;
                    }
                    else if (transport == "动车")
                    {
                        discount = 0.75;
                    }
                }
                else
                {
                    if (transport == "航班")
                    {
                        discount = 0.6;
                    }
                    else if (transport == "动车")
                    {
                        discount = 0.3;
                    }
                }

                return originalPrice * discount;
            }
        }
    
*/